<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
  {{info}}
  <h1 v-for="name in arr">{{name}}</h1>
    <table border="1">
        <caption>任务列表</caption>
        <tr><td>姓名</td><td>年龄</td><td>性别</td></tr>
        <tr v-for="p in persons">
            <td>{{p.name}}</td>
            <td>{{p.age}}</td>
            <td>{{p.gender}}</td>
        </tr>
    </table>
    <table border="1">
        <caption>商品列表</caption>
        <tr v-for="pro in products">
            <td>{{pro.title}}</td>
            <td>{{pro.price}}</td>
            <td>{{pro.num}}</td>
        </tr>
    </table>
</div>
<script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>

<script>
  let v = new Vue({
    el:"body>div",
    data:{
      info:"循环遍历",
        arr:["刘备","关羽","张飞"],
        persons:[{name : "孙尚香", age : 18, gender : "女"},
            {name : "刘备", age : 28, gender : "男"},
            {name : "刘禅", age : 10, gender : "男"}],
        products:[{title:"冰红茶",price:4,num:30},
            {title:"绿茶",price:4.5,num:20},
            {title:"冰糖雪梨",price:5,num:50}]
    }
  })
</script>
</body>
</html>